﻿@{
    Layout = "";
}
@model ConfigurationModel
@using Nop.Plugin.Payments.PayPalDirect.Models;
@using Nop.Web.Framework;

@Html.Action("StoreScopeConfiguration", "Setting", new { area = "Admin" })

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <div class="panel-group">
        <div class="panel panel-default">
            <div class="panel-body">
                <p>
                    <b>If you're using this gateway ensure that your primary store currency is supported by Paypal.</b><br />
                    <br />
                    1. Log into your PayPal account.<br />
                    2. Click on Profile from the Home Menu.<br />
                    3. Under Account Information >> Choose API Access.<br />
                    4. Click on Request API Credentials.<br />
                    5. Choose API Signature as the credential type.<br />
                    6. Enable the checkbox and agree to the license Terms-I agree to the API Certificate Terms of Use and terms incorporated therein and press the Submit button<br />
                    <br />
                    Before being able to receive IPN messages (optional), you'll need to activate this service; follow these steps:<br />
                    <br />
                    1. Log in to your Premier or Business account.<br />
                    2. Click the Profile subtab.<br />
                    3. Click Instant Payment Notification in the Selling Preferences column.<br />
                    4. Click the 'Edit IPN Settings' button to update your settings.<br />
                    5. Select 'Receive IPN messages' (Enabled) and enter the URL of your IPN handler (http://www.yourStore.com/Plugins/PaymentPayPalDirect/IPNHandler).<br />
                    6. Click Save, and you should get a message that you have successfully activatedIPN.
                </p>
                <div class="form-group">
                    <div class="col-md-3">
                        @Html.OverrideStoreCheckboxFor(model => model.TransactModeId_OverrideForStore, model => model.TransactModeId, Model.ActiveStoreScopeConfiguration)
                        @Html.NopLabelFor(model => model.TransactModeValues)
                    </div>
                    <div class="col-md-9">
                        @Html.NopDropDownList("TransactModeId", Model.TransactModeValues)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3">
                        @Html.OverrideStoreCheckboxFor(model => model.UseSandbox_OverrideForStore, model => model.UseSandbox, Model.ActiveStoreScopeConfiguration)
                        @Html.NopLabelFor(model => model.UseSandbox)
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.UseSandbox)
                        @Html.ValidationMessageFor(model => model.UseSandbox)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3">
                        @Html.OverrideStoreCheckboxFor(model => model.ApiAccountName_OverrideForStore, model => model.ApiAccountName, Model.ActiveStoreScopeConfiguration)
                        @Html.NopLabelFor(model => model.ApiAccountName)
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.ApiAccountName)
                        @Html.ValidationMessageFor(model => model.ApiAccountName)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3">
                        @Html.OverrideStoreCheckboxFor(model => model.ApiAccountPassword_OverrideForStore, model => model.ApiAccountPassword, Model.ActiveStoreScopeConfiguration)
                        @Html.NopLabelFor(model => model.ApiAccountPassword)
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.ApiAccountPassword)
                        @Html.ValidationMessageFor(model => model.ApiAccountPassword)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3">
                        @Html.OverrideStoreCheckboxFor(model => model.Signature_OverrideForStore, model => model.Signature, Model.ActiveStoreScopeConfiguration)
                        @Html.NopLabelFor(model => model.Signature)
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.Signature)
                        @Html.ValidationMessageFor(model => model.Signature)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3">
                        @Html.OverrideStoreCheckboxFor(model => model.AdditionalFee_OverrideForStore, model => model.AdditionalFee, Model.ActiveStoreScopeConfiguration)
                        @Html.NopLabelFor(model => model.AdditionalFee)
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.AdditionalFee)
                        @Html.ValidationMessageFor(model => model.AdditionalFee)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3">
                        @Html.OverrideStoreCheckboxFor(model => model.AdditionalFeePercentage_OverrideForStore, model => model.AdditionalFeePercentage, Model.ActiveStoreScopeConfiguration)
                        @Html.NopLabelFor(model => model.AdditionalFeePercentage)
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.AdditionalFeePercentage)
                        @Html.ValidationMessageFor(model => model.AdditionalFeePercentage)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3">
                        &nbsp;
                    </div>
                    <div class="col-md-9">
                        <input type="submit" name="save" class="btn bg-blue" value="@T("Admin.Common.Save")" />
                    </div>
                </div>
            </div>
        </div>
    </div>
}